package com.guava;


import com.google.common.base.Objects;

/**
 * @author: sun.hongliang
 * @create: 2018/06/12 15:26
 */
public class ObjectsTest {

    public static void main(String[] args) {
        testObjects();
    }

    /**
     * Objects对象比较API
     */
    public static void testObjects() {
        boolean a = Objects.equal("a", null);
        boolean b = Objects.equal("a", "a");
        boolean c = Objects.equal(null, null);
        Object a1 = new Object();
        Object a2 = new Object();
        boolean d = Objects.equal(a1, a2);

        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);
    }

}
